<template>
	<view class="index">
		<image class="logo" src="/static/logo.png"></image>
		<view @click="goAbout" class="text-area">
			<text class="title">{{title}}</text>
		</view>
		<view>
			<!-- 视频流播放 -->
		<video id="myVideo" src="http://ivi.bupt.edu.cn/hls/cctv3hd.m3u8"
			play-strategy="3"></video>
		</view>
		<text class="iconfont testicon">&#xe6bf;</text>
	</view>
</template>

<script>
	import Ajax from '@/ajax/index'
	import {
		togoPage
	} from '@/utils/utils.js'
	import {
		homeApi
	} from '@/ajax/api.js'
	export default {
		data() {
			return {
				title: '去About'
			}
		},
		onLoad() {
		  this.init()		
		},
		methods: {
			goAbout(){
				// 跳转的路由，对象是路由带的参数
				togoPage('/pages/index/about', {
					about: '12',
					name:'张三'
				})
			},
		  // 接口调用
		  async init(){
			let data = await Ajax({
			  	url: homeApi.userList,
			  	method:'POST',
			  	data:{a:1}
			  })
		  }
		}
	}
</script>

<style lang="scss">
	.index {
		.testicon {
			color: red;
			font-weight: 600;
			font-size: 80rpx;
		}
	}
</style>
